/*
  学习目标：Redux设计- Action设计
*/
import {
  TODO_DEL_BY_ID,
  TODO_Update_By_Id,
  TODO_UPDATE_TYPE,
} from "./actionTypes";

// 1. 分模块, 使用单独多文件, 维护action创建函数:  action/todo.js  action/user.js
// todo:  todo/delById
// user : user/deyById
export const delByIdAction = (payload) => ({
  type: TODO_DEL_BY_ID,
  payload,
});

export const updateByIdAction = (payload) => ({
  type: TODO_Update_By_Id,
  payload,
});

export const updateTypeAction = (payload) => ({
  type: TODO_UPDATE_TYPE,
  payload,
});
